# -*- coding: utf-8 -*-
import sys
sys.path.append("../..")
from db.mysql import MysqlClient
from common.helper import Helper
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "人人安康百万医疗保险-家庭版"

    def pullData(self, data={}):
        for item in Helper.selectData( self.name, self.mysql ):
            data["name"] = self.name
            data["company"] = "中国人民保险"
            data["year"] = item["year"]
            data["socialSec"] = item["socialSec"]
            data["expire"] = item["expire"]
            data["payType"] = item["payType"]
            data["generalMedical"] = str(int(int( item["generalMedical"])/10000)) + "w"
            data["cancerMedical"] = str(int(int( item["cancerMedical"])/10000)) + "w"
            data["deductible"] = str( int(int(item["deductible"])/10000)) + "w"
            data["family"] = item["family"]
            data["payRate"] = item["payRate"]
            data["price"] = item["price"]
            Helper.mergeTable("medical",self.mysql,data )